package com.xidian.zhiancloud.service.chemicalsManagement.chemicalManager.wastePart;

import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xidian.zhiancloud.dao.WasteTypeMapper;
import com.xidian.zhiancloud.model.WasteType;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * @Author: Egoist
 * @Date: 2020/11/10 17:00
 */

@Service
public class WasteTypeService extends ServiceImpl<WasteTypeMapper, WasteType> implements IService<WasteType> {


    public Map<Long, String> getList() {
        List<WasteType> list = list();
        return list.stream().collect(Collectors.toMap(WasteType::getId, WasteType::getWasteType));
    }
}
